﻿namespace EyeOpen.IO
{
	using System;
	using System.IO.Ports;

	public interface IPort 
		: IDisposable
	{
		event EventHandler<SerialDataReceivedEventArgs> DataReceived;

		int BytesToRead { get; }

		bool IsOpen { get; }

		bool DtrEnable { get; set; }

		bool RtsEnable { get; set; }

		void DiscardOutBuffer();

		void DiscardInBuffer();

		void Write(byte[] arrayByte, int i, int length);

		void Open();

		void Close();

		void Read(byte[] bytes, int i, int numOfBytes);
	}
}